const state = {
    formSource: [{
        id: 1,
        name: 'Radio数据',
        url: '/source/radio',
        method: 'GET'
    }, {
        id: 2,
        name: 'Checkbox数据',
        url: '/source/checkbox',
        method: 'GET'
    }, {
        id: 3,
        name: 'Autocomplete数据',
        url: '/source/autocomplete',
        method: 'GET'
    }, {
        id: 4,
        name: 'Select数据',
        url: '/source/select',
        method: 'GET'
    }, {
        id: 5,
        name: 'Cascader数据',
        url: '/source/cascader',
        method: 'GET'
    }, {
        id: 6,
        name: 'CascaderPanel数据',
        url: '/source/cascaderPanel',
        method: 'GET'
    }, {
        id: 7,
        name: 'Transfer数据',
        url: '/source/transfer',
        method: 'GET'
    }, {
        id: 8,
        name: 'Tree数据',
        url: '/source/tree',
        method: 'GET'
    }]
}

const mutations = {
    SET_FORM_SOURCE (state, data) {
        state.formSource = data
    }
}

const actions = {
    setFormSource ({ commit }, data) {
        commit('SET_FORM_SOURCE', data)
    }
}

export default {
    state,
    mutations,
    actions
}
